package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * Created by Administrator on 2016/9/18.
 */
public class ReplyGetCommentListAction extends AHttpService<PbBean.PbResCommentGetCommentList> {
    private int id;
    private int offset;
    private PbBean.PbSignNavType type;

    private ReplyGetCommentListAction(Context context, int id, int offset,PbBean.PbSignNavType type) {
        super(context);
        this.id = id;
        this.offset = offset;
        this.type = type;
    }

    public static ReplyGetCommentListAction newInstance(Context context, int id, int offset,PbBean.PbSignNavType type) {
        return new ReplyGetCommentListAction(context, id, offset,type);
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqCommentGetCommentList.Builder builder = PbBean.PbReqCommentGetCommentList.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setDetailId(id);
        builder.setOffset(offset);
        builder.setType(type);

        return apiService.replyGetCommentList(builder.build());
    }
}
